package com.zt.bus.line.model;

import java.io.Serializable;

import com.zt.system.model.BusinessException;
import com.zt.system.model.Entity;

import net.sf.json.JSONObject;

public class Driver extends Entity implements Serializable {
    private String driverNo;

    private String driverName;

    private String driverPhone;

    private static final long serialVersionUID = 1L;

    public String getDriverNo() {
        return driverNo;
    }

    public void setDriverNo(String driverNo) {
        this.driverNo = driverNo;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getDriverPhone() {
        return driverPhone;
    }

    public void setDriverPhone(String driverPhone) {
        this.driverPhone = driverPhone;
    }
    
    public JSONObject toJson(Driver driver){
    	if(driver == null){
    		throw new BusinessException("转换参数错误");
    	}
    	JSONObject json = new JSONObject();
    	json.put("driverNo", driver.getDriverNo());
    	json.put("driverName", driver.getDriverName());
    	json.put("driverPhone", driver.getDriverPhone());
    	return json;
    }
}